<?php
$backend = dirname(dirname(dirname(__FILE__))); 
$qtrootpath = dirname(dirname(dirname(dirname(__FILE__))));
Yii::setPathOfAlias('ext', dirname(__FILE__).DS.'..'.DS.'extensions');
Yii::setPathOfAlias('static', $backend.DS.'static');
Yii::setPathOfAlias('qtpath', $qtrootpath);
return CMap::mergeArray(require($qtrootpath.DS.'public'.DS.'db.php'),array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'UU周末总后台',
    'defaultController'=>'index',
	'preload'=>array('log'),
    'timeZone'=>'Asia/Chongqing',
	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
        'application.extensions.*',
        'ext.giix-components.*',
	),

	'modules'=>array(
		// uncomment the following to enable the Gii tool

		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'123456',
            'generatorPaths'=>array(
                'ext.giix-core',

            ),
			// If removed, Gii defaults to localhost only. Edit carefully to taste.
			'ipFilters'=>array('127.0.0.1','::1'),
		),

	),

	// application components
	'components'=>array(
		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
            'loginUrl'=>array('auth/login'),
		),
		// uncomment the following to enable URLs in path-format

		'urlManager'=>array(
            'urlFormat'=>'path',
            'showScriptName'=>false,
            'urlSuffix' => '/',
		),

		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'site/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
			),
		),
	),
    'params'=>require(dirname(__FILE__) . '/params.php'),
));